import { View } from '@tarojs/components';
import './index.scss';

const QButton = (props) => {
  const {
    type = 'primary', width, className, children, onClick,
  } = props;
  return (
    <View className={`q-button q-button-${type} ${className}`} style={{ width }} onClick={() => { if (onClick) { onClick(); } }}>
      {children}
    </View>
  );
};
export default QButton;
